package net.ufrog.common.weixin.pojos;

import com.alibaba.fastjson.annotation.JSONField;

/**
 * 访问令牌
 * 
 * @author ultrafrog
 * @version 1.0, 2014-12-29
 * @since 1.0
 */
public class AccessToken extends Err {

	private static final long serialVersionUID = -6436075401392058407L;

	/** 令牌值 */
	@JSONField(name = "access_token")
	private String accessToken;
	
	/** 有效时间<br>单位：秒 */
	@JSONField(name = "expires_in")
	private Integer expiresIn;
	
	/** 刷新令牌 */
	@JSONField(name = "refresh_token")
	private String refreshToken;
	
	/** 用户标识 */
	private String openid;
	
	/** 域 */
	private String scope;
	
	/** 唯一编号 */
	private String unionid;

	/**
	 * 读取令牌值
	 * 
	 * @return
	 * @see #accessToken
	 */
	public String getAccessToken() {
		return accessToken;
	}

	/**
	 * 设置令牌值
	 * 
	 * @param accessToken
	 * @see #accessToken
	 */
	public void setAccessToken(String accessToken) {
		this.accessToken = accessToken;
	}

	/**
	 * 读取有效时间
	 * 
	 * @return
	 * @see #expiresIn
	 */
	public Integer getExpiresIn() {
		return expiresIn;
	}

	/**
	 * 设置有效时间
	 * 
	 * @param expiresIn
	 * @see #expiresIn
	 */
	public void setExpiresIn(Integer expiresIn) {
		this.expiresIn = expiresIn;
	}

	/**
	 * 读取刷新令牌
	 * 
	 * @return
	 * @see #refreshToken
	 */
	public String getRefreshToken() {
		return refreshToken;
	}

	/**
	 * 设置刷新令牌
	 * 
	 * @param refreshToken
	 * @see #refreshToken
	 */
	public void setRefreshToken(String refreshToken) {
		this.refreshToken = refreshToken;
	}

	/**
	 * 读取用户标识
	 * 
	 * @return
	 * @see #openid
	 */
	public String getOpenid() {
		return openid;
	}

	/**
	 * 设置用户标识
	 * 
	 * @param openid
	 * @see #openid
	 */
	public void setOpenid(String openid) {
		this.openid = openid;
	}

	/**
	 * 读取域
	 * 
	 * @return
	 * @see #scope
	 */
	public String getScope() {
		return scope;
	}

	/**
	 * 设置域
	 * 
	 * @param scope
	 * @see #scope
	 */
	public void setScope(String scope) {
		this.scope = scope;
	}

	/**
	 * 读取唯一编号
	 * 
	 * @return
	 * @see #unionid
	 */
	public String getUnionid() {
		return unionid;
	}

	/**
	 * 设置唯一编号
	 * 
	 * @param unionid
	 * @see #unionid
	 */
	public void setUnionid(String unionid) {
		this.unionid = unionid;
	}
}
